package com.heima.search.repository;

import com.heima.search.entity.ApAssociateWords;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * es 查询联想词的仓库接口
 */
public interface ApAssociateWordsRepository extends MongoRepository<ApAssociateWords,String> {
    /**
     * 以输入的关键词开头查询, 并分页查询
     * @param name
     * @param pageable
     * @return
     */
    List<ApAssociateWords> findTopByAssociateWordsStartingWith(String name, Pageable pageable);
    
}